package com.wgj.android.base;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.bigkoo.convenientbanner.holder.Holder;
import com.jiaai.xui.utils.imageload.XImage;
import com.wgj.android.base.entity.Banner;

/**
 * Created by Administrator on 2017/11/3.
 */

public class BannerHolderView implements Holder<Banner> {
    private ImageView imageView;
    @Override
    public View createView(Context context) {
        imageView = new ImageView(context);
        imageView.setScaleType(ImageView.ScaleType.FIT_XY);
        return imageView;

    }

    @Override
    public void UpdateUI(Context context, int position, Banner data) {
        XImage.getInstance().load(imageView,data.getImgUrl());
    }
}
